#!/bin/bash

addr=`bitcoin-cli getnewaddress`
echo "address => $addr"

txid=`bitcoin-cli sendtoaddress $addr 2.45`
echo "txid => $txid"

blks=`bitcoin-cli generate 6`
echo "mined 6 block"

received=`bitcoin-cli getreceivedbyaddress $addr 6`
echo "received  => $received"

